from bs4 import BeautifulSoup

# 定义一个测试的html文件
test_html = """
    <html>
        <head>
         <title>⿊⻢程序员</title>
        </head>
        <body name="软件测试" action="www.itheima.com">
            < a href="/api.html">接⼝测试</ a>
            < a href="/web.html">Web⾃动化测试</ a>
            < a href="/app.html">APP⾃动化测试</ a>
        </body>
    </html>
"""

bs = BeautifulSoup(test_html, "html.parser")
bs1 = bs.body.get("action")
print(bs1)
